#include<reg52.h>
#include<key.h>
#include<delay.h>
#include<wheel.h>
#include<keycontroller.h>


void key_controller()
{
	 if(KEY1==0)
     { 
       delay(20);
       if(KEY1==0)
	   { 
         forward();
         //delay(5000);
	   }
   } else if(KEY2==0)
    {
       delay(20);
	   if(KEY2==0)
	  {
        back();
       // delay(5000);
	  }
    } else if(KEY3==0)
      {
       delay(20);
	   if(KEY3==0)
	  {
        left();
      // delay(5000);
	  }
     } else if(KEY4==0)
      {
       delay(20);
	   if(KEY4==0)
	   {
	    right();
     // delay(5000);
	   }
      }
  
}